<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Cookie Show</title>
</head>
<body>
	<%
	String userid = request.getParameter("userid");
	String password = request.getParameter("password");
	if("admin".equals(userid)&&"admin".equals(password)){
		session.setAttribute("login", "OK");
		session.setMaxInactiveInterval(-1);
		response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
		response.setHeader("Location", "main.jsp");
	}
	else{
		out.println("用户名或密码错误");
	}
	%>
</body>
</html>